package com.itheima.blog.web.controller;

import com.itheima.api.client.BannerClient;
import com.itheima.api.client.po.TBanner;
import com.itheima.common.domain.R;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/web")
@RequiredArgsConstructor
public class TBannerCotroller {
    private final BannerClient bannerClient;
    @GetMapping("/banner/list")
    @ApiOperation("轮播图")
    public List<TBanner> findBanner(){
        List<TBanner> tagList = bannerClient.getTagList();
        return tagList;
    }
}
